/*
 * Copyright © 2011 Breachwalls & Company Inc. and other authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.breachwalls.h2p.platform.workflow.business;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

/**
 * ワークフロー内で使用するビジネスオブジェクトのインスタンス.
 * @author Ken Todoroki
 * @version $Revision$
 */
public class BusinessInstance implements Serializable {

    private static final long serialVersionUID = -5993842372464584388L;

    private String flowName;

    private String id;

    private Map<String, Object> variables = new HashMap<String, Object>();

    public String getFlowName() {
        return flowName;
    }

    public void setFlowName(String flowName) {
        this.flowName = flowName;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public void setId(Long id) {
        this.id = id.toString();
    }

    public Map<String, Object> getVariables() {
        return variables;
    }

    public void setVariables(Map<String, Object> variables) {
        this.variables = variables;
    }

    public void put(String key, Object value) {
        variables.put(key, value);
    }

}
